﻿using BigEgg.Framework.Foundation.Validations;
using FMStudio.Domain.Properties;
using System;
using System.ComponentModel.DataAnnotations;

namespace FMStudio.Domain
{
    public interface ICurrencyExchange
    {
        DateTime Date { get; set; }

        [Required(ErrorMessageResourceName = "ExchangeFromMandatory", ErrorMessageResourceType = typeof(Resources))]
        ICurrency From { get; set; }

        [Required(ErrorMessageResourceName = "ExchangeToMandatory", ErrorMessageResourceType = typeof(Resources))]
        ICurrency To { get; set; }

        [Required(ErrorMessageResourceName = "ExchangePriceMandatory", ErrorMessageResourceType = typeof(Resources))]
        [GreaterThan(0.0, ErrorMessageResourceName = "ExchangePriceGreater", ErrorMessageResourceType = typeof(Resources))]
        double Price { get; set; }
    }
}
